package hufu.service.controller;

import java.util.Map;

import hufu.service.util.QlcSpider;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class QlcController
{
    private final Logger logger = LoggerFactory.getLogger(this.getClass());

    @RequestMapping
    public ModelAndView index(HttpServletRequest request, HttpServletResponse response) throws Exception
    {
    	logger.debug("{}","qlc!!!");
    	Map<String, String> map = QlcSpider.getEditionAndNum();
    	String winNum = map.get("winNum");
    	String edition = map.get("edition");
    	logger.debug("号:{},期:{}",winNum,edition);
    	return new ModelAndView("/qlc/index.html");
    }
}
